#ifndef __User_Uart_H__
#define __User_Uart_H__

#include "main.h"
#include "usart.h"
#include "string.h"



//#ifndef Use_Shell 
//#define Use_Shell 
//#endif


/***************************************/



//#define uart1_IT
//#define uart1_DMA

//#define uart2_IT
#define uart2_DMA

//#define uart3_IT
//#define uart3_DMA

//#define uart4_IT
//#define uart4_DMA
/***************************************/

#ifndef Data_Len_Max 
#define Data_Len_Max 150
#endif

#ifdef Use_Shell
  #define Shell_Uart_Data Uart1_Data    这里是为了提醒修改特定的错误//
#endif

#ifdef Use_Shell
extern char Shell_Flag; //设定变量时为了串口复用
#endif
typedef struct
{
  uint16_t  Uart_Receive_Cunt; //
  uint8_t   Uart_Receive_Complete; //
  uint8_t   Uart_Receive_Arry[Data_Len_Max];
  uint8_t   *Uart_Send_Arry;
  UART_HandleTypeDef *huart;
	
}Uart_Typedef;



extern Uart_Typedef Uart1_Data,Uart2_Data,Uart3_Data,Uart4_Data;






void User_Uart_Init(void);
void Uart_DMA_Init(void);
void Uart_Call_Back(void);
void Uart_IT_Init(void);
void Uart_DMA_Data_Rest(Uart_Typedef *uart);
#endif
















